<template>
  <div class="block">
    <el-timeline>
      <el-timeline-item v-for="(item,index) of viewList" :key="index" :timestamp="item.viewTime" placement="top">
        <el-card>
          <h4>{{ item.name }}</h4>
          <p>{{ item.resIdentity | dataFilter(resIdentityOperations) }}</p>
          <p>{{ item.expectRecruitment }}</p>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script>
import { resIdentityOperations } from '@/utils/constants'
import {
  getResumeViewList
} from '@/api/user'
export default {
  data() {
    return {
      viewList: null,
      resIdentityOperations: resIdentityOperations
    }
  },
  mounted() {
    this.getResumeList()
  },
  methods: {
    getResumeList() {
      var param = { employerId: this.$store.getters.employerId }
      getResumeViewList(param).then(
        (response) => {
          this.viewList = response.data
        }
      )
    }
  }
}
</script>
